home *** CD-ROM | disk | FTP | other *** search
- Path: taco.cc.ncsu.edu!rbsteven
- From: rbsteven@eos.ncsu.edu (Robert Barclay Stevenson)
- Newsgroups: comp.lang.c++
- Subject: HELP 2d dynamically allocated array
- Date: 17 Mar 1996 18:06:06 GMT
- Organization: North Carolina State University, Project Eos
- Distribution: world
- Message-ID: <4ihkae$8nt@taco.cc.ncsu.edu>
- Reply-To: rbsteven@eos.ncsu.edu (Robert Barclay Stevenson)
- NNTP-Posting-Host: prez.sod.ncsu.edu
- Keywords: help, arrays
- Originator: rbsteven@prez.sod.ncsu.edu
-
-
- Hey there...
-
- I am trying to figure out a way to effectively dynamically allocate a 2d
- array using new and delete operators. I have tried using multiple indirection
- on something like:
-
- int **array_; //is this the same as array_[] ?
-
- And then use something like:
-
- array[depth] = new int[width];
-
- But I think I has missed the boat somewhere along the way. If someone could
- please point me in the right direction or send me a sample, I would be very
- grateful. Thanks a lot.
- --
- --------------------------------------------------------------------------------
- Robert Stevenson | "Virtual Reality won't merely replace TV.
- North Carolina State University | It will eat it alive." A.C. Clarke
- |
-